<?php defined('SYSPATH') or die('No direct script access.');
class Model_tool_seo
{
	public function get_headers($url){
		$o = curl_init($url);
		curl_setopt($o,CURLOPT_RETURNTRANSFER,true);
		$h = curl_exec($o);
		$curl_r = curl_getinfo($o);
		
		$headers_r = get_headers($url,true);
		
		$headers = array();
		$headers['Status'] = get($headers_r,0);
		$headers['Bytes'] = max(get($curl_r,'size_download'),get($curl_r,'download_content_length'),strlen($h));
		unset($headers_r[0]);
		$headers += $headers_r;
		
		return $headers;
	}
}
